Skip to content

test_bot/formulae: only run subset of brew tests for portable Ruby#23113

Merged
p-linnane merged 1 commit into
mainfrom
test_bot-restrict-portable-ruby-tests
Jul 14, 2026
Merged

test_bot/formulae: only run subset of brew tests for portable Ruby#23113
p-linnane merged 1 commit into
mainfrom
test_bot-restrict-portable-ruby-tests

Conversation

@cho-m

@cho-m cho-m commented Jul 14, 2026

Copy link
Copy Markdown
Member

Currently tests fail on all runners (Tier 1 Linux and Tier 3 macOS). It is difficult to align the setups used between Homebrew/brew and Homebrew/core so can limit to basic sanity of the cask and formula tests.

Also update brew style to run on Tier 1-only so that we don't have to manually update formula list and can keep independent from brew style implementation details.

Portable Ruby PRs have been broken for over a month now. Given we now have a new Ruby update (along with OpenSSL, etc.), this should unblock us:


  • Have you followed our Contributing guidelines?
  • Have you checked for other open Pull Requests for the same change?
  • Have you explained what your changes do? Performance claims (e.g. "this is faster") must include Hyperfine benchmarks.
  • Have you explained why you'd like these changes included, not just what they do?
  • For bug fixes, have you given step-by-step brew commands to reproduce the bug?
  • Have you written new tests (excluding integration tests)? Here's an example.
  • Have you successfully run brew lgtm (style, typechecking and tests) locally?

  • AI was used to generate or assist with generating this PR.

Currently tests fail on all runners (Tier 1 Linux and Tier 3 macOS). It
is difficult to align the setups used between Homebrew/brew and
Homebrew/core so can limit to basic sanity of the cask and formula
tests.
Copilot AI review requested due to automatic review settings July 14, 2026 20:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts test_bot’s portable Ruby workflow to avoid failures across unsupported/less-aligned runner environments by (a) restricting when brew style runs and (b) reducing the scope of brew tests executed for portable Ruby.

Changes:

  • Run brew style only when Homebrew considers the current environment a “Tier 1 configuration”.
  • Restrict brew tests to a subset via --only=cask,formula for portable Ruby runs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Library/Homebrew/test_bot/formulae.rb
Comment thread Library/Homebrew/test_bot/formulae.rb
@p-linnane
p-linnane added this pull request to the merge queue Jul 14, 2026
Merged via the queue into main with commit 9fd4e81 Jul 14, 2026
46 checks passed
@p-linnane
p-linnane deleted the test_bot-restrict-portable-ruby-tests branch July 14, 2026 21:30
test "brew", "install-bundler-gems", "--groups=all"
test "brew", "vendor-gems", "--non-bundler-gems", "--no-commit"
test "brew", "tests", "--online", "--coverage"
test "brew", "tests", "--online", "--coverage", "--only=cask,formula"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we have tests failing on Tier 1 Linux runners? Any ideas?

@cho-m cho-m Jul 15, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently failing on Gzip unpack test. I've tried a few changes to debug and see if chown could help:

Still failing on the sticky bit. I don't think we ever add it ourselves, so I'd expect the default /var/tmp sticky is causing issues in our nested directory.

Since I haven't been able to reproduce yet, I'm not able to figure out the exact conditions this happens. No issues running brew tests --only unpack_strategy/gzip on Linux VM where I spun up a Docker container (as close as I can get to CI).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, thanks. Can we just skip that specific test in brew tests itself so we can run the test?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can explore again since we no longer are blocking any PRs.

I think root case is actually from running brew vendor-gems prior to tests:

if GitHub::Actions.env_set? && HOMEBREW_PREFIX.to_s == HOMEBREW_LINUX_DEFAULT_PREFIX
ohai "chmod +t -R /home/linuxbrew/"
system "sudo", "chmod", "+t", "-R", "/home/linuxbrew/"

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MikeMcQuaid

Copy link
Copy Markdown
Member

Thanks for unblocking us here @cho-m ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants